package com.example.springbasicstudy;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.scheduling.annotation.EnableAsync;

/**
 * <pre>
 * 功能描述：
 * </pre>
 *
 * @author: 李明杰
 * @date: 2022/8/22 23:42
 */
//@EnableTransactionManagement
//@EnableAspectJAutoProxy(proxyTargetClass = true, exposeProxy = true)//作用让同一个类方法互相调用不失效（事务不失效）
@MapperScan("com.example.springbasicstudy.*.mapper")
@SpringBootApplication
@EnableAsync
@EnableCaching
public class SpringBasicApplication {
    public static void main(String[] args) {
        //下面语句使得日志输出使用异步处理，减小输出日志对性能的影响
        System.setProperty("Log4jContextSelector",
                "org.apache.logging.log4j.core.async.AsyncLoggerContextSelector");
        SpringApplication.run(SpringBasicApplication.class, args);
    }
}
